﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Midapex.SmartOrm.Examples
{
    /// <summary>
    /// 书籍评论
    /// </summary>
    [TableMapping]
    public class Comment
    {
        public Comment(string content)
        {
            this.content = content;
        }

        /// <summary>
        /// 提供一个无参数的构造函数，为动态生成对象最好准备。
        /// 该函数可以是私有的函数。
        /// </summary>
        private Comment()
        {
        }

        short id;

        [Column(PrimaryKey=true,Autoincrement=true)]
        public short Id
        {
            get { return id; }
            set { id = value; }
        }

        string content;

        [Column(Size=3000)]
        public string Content
        {
            get { return content; }
            set { content = value; }
        }

    }
}
